package cn.getech.data.development.constant;

import lombok.Getter;

/**
 * 任务类型的枚举
 *
 * @author zenith
 */
@Getter
public enum VersionType {


    PACK(0, "打包"),
    BACKUPS(1, "备份");

    int code;
    String name;

    VersionType(int code, String message) {
        this.code = code;
        this.name = message;
    }

    public static VersionType ObjOf(Integer code) {
        if (code == null) {
            return null;
        } else {
            for (VersionType s : VersionType.values()) {
                if (s.getCode() == code) {
                    return s;
                }
            }
            return null;
        }
    }
}
